package com.qiantu.api.entity;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.NotNull;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @ClassName SceneTaskBean
 * @Description TODO
 * @Author ShiJunqiang
 * @Date 2021/12/6 13:34
 * @Version 1.0
 */
public class SceneDetailBean{
    private String sceneSerialNo;
    private String name;
    private String image;
    private Boolean isFavourite;
    private Boolean isHide;
    private boolean isDisable;
    /**
     * 普通场景 : 1
     * 特效场景 : 2
     * 场景意图 : 3
     * 私人场景 : 4
     * 回家模式 : 5
     * 离家模式 : 6
     * 观影模式 : 7
     * 睡眠模式 : 8
     */
    private Integer sceneType;
    private String houseSerialNo;
    private String houseName;
    private String roomSerialNo;
    private String roomName;
    private String floorSerialNo;
    private String floorName;
    private int linkType;
    private Integer sort;
    private List<SceneTaskBean> sceneTasks;
//    private List<SceneTaskBean> sceneTask;
    private List<SwitchBindBean> switchBindList;
    private String bingSceneSerialNo;
    private Boolean hasActionSetting;

    public String getSceneSerialNo() {
        return sceneSerialNo;
    }

    public void setSceneSerialNo(String serialNo) {
        this.sceneSerialNo = serialNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Boolean getFavourite() {
        return isFavourite;
    }

    public void setFavourite(Boolean favourite) {
        isFavourite = favourite;
    }

    public Boolean getHide() {
        return isHide;
    }

    public void setHide(Boolean hide) {
        isHide = hide;
    }

    public boolean isDisable() {
        return isDisable;
    }

    public void setDisable(boolean disable) {
        isDisable = disable;
    }

    public Integer getSceneType() {
        return sceneType;
    }

    public void setSceneType(Integer sceneType) {
        this.sceneType = sceneType;
    }

    public String getHouseSerialNo() {
        return houseSerialNo;
    }

    public void setHouseSerialNo(String houseSerialNo) {
        this.houseSerialNo = houseSerialNo;
    }

    public String getHouseName() {
        return houseName;
    }

    public void setHouseName(String houseName) {
        this.houseName = houseName;
    }

    public String getRoomSerialNo() {
        return roomSerialNo;
    }

    public void setRoomSerialNo(String roomSerialNo) {
        this.roomSerialNo = roomSerialNo;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public String getFloorSerialNo() {
        return floorSerialNo;
    }

    public void setFloorSerialNo(String floorSerialNo) {
        this.floorSerialNo = floorSerialNo;
    }

    public String getFloorName() {
        return floorName;
    }

    public void setFloorName(String floorName) {
        this.floorName = floorName;
    }

    public int getLinkType() {
        return linkType;
    }

    public void setLinkType(int linkType) {
        this.linkType = linkType;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public List<SceneTaskBean> getSceneTasks() {
        if (sceneTasks == null){
            sceneTasks = new ArrayList<>();
        }
        return sceneTasks;
    }

    public boolean hasSceneTasks(){
        if (sceneTasks == null || sceneTasks.isEmpty()){
            return false;
        }
        return true;
    }

    public void setSceneTasks(List<SceneTaskBean> sceneTasks) {
        this.sceneTasks = sceneTasks;
    }

//    public void setSceneTask(List<SceneTaskBean> sceneTask) {
//        this.sceneTask = sceneTask;
//    }

    public List<SwitchBindBean> getSwitchBindList() {
        return switchBindList;
    }

    public void setSwitchBindList(List<SwitchBindBean> switchBindList) {
        this.switchBindList = switchBindList;
    }

    public String getBingSceneSerialNo() {
        return bingSceneSerialNo;
    }

    public void setBingSceneSerialNo(String bingSceneSerialNo) {
        this.bingSceneSerialNo = bingSceneSerialNo;
    }

    public Boolean getHasActionSetting() {
        return hasActionSetting;
    }

    public void setHasActionSetting(Boolean hasActionSetting) {
        this.hasActionSetting = hasActionSetting;
    }

    public static class SceneTaskBean {
        private String sceneTaskSerialNo;
        private String name;
        private Integer sceneId;
        private Integer sort;
        /**
         * 任务类型
         * [延时指令 （SceneTaskType为2时填写数据SceneDelayedTask），设备控制指令 （SceneTaskType为1时填写数据SceneDeviceInstruct）]
         * 【设备指令 = 1,延时任务 = 2,发送消息 = 3,联动任务 = 4,】,可用值:
         * 设备指令 : 1 ,
         * 延时任务 : 2 ,
         * 发送消息 : 3 ,
         * 联动任务 : 4
         */
        private Integer sceneTaskType;
        private String taskSerialNo;
        private List<String> taskBriefing;
        private String image;
        private SceneDelayedTask sceneDelayedTask;
        private SceneDeviceInstructBean sceneDeviceInstruct;
        private ScenePushMessage scenePushMessage;
        private List<LinkageStartStop> linkageStartStops;
        private SceneDeviceGroupInstruct sceneDeviceGroupInstruct;


        public String getSceneTaskSerialNo() {
            return sceneTaskSerialNo;
        }

        public void setSceneTaskSerialNo(String sceneTaskSerialNo) {
            this.sceneTaskSerialNo = sceneTaskSerialNo;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getSceneId() {
            return sceneId;
        }

        public void setSceneId(Integer sceneId) {
            this.sceneId = sceneId;
        }

        public Integer getSort() {
            return sort;
        }

        public void setSort(Integer sort) {
            this.sort = sort;
        }

        public Integer getSceneTaskType() {
            return sceneTaskType;
        }

        public void setSceneTaskType(Integer sceneTaskType) {
            this.sceneTaskType = sceneTaskType;
        }

        public String getTaskSerialNo() {
            return taskSerialNo;
        }

        public void setTaskSerialNo(String taskSerialNo) {
            this.taskSerialNo = taskSerialNo;
        }

        public List<String> getTaskBriefing() {
            return taskBriefing;
        }

        public void setTaskBriefing(List<String> taskBriefing) {
            this.taskBriefing = taskBriefing;
        }

        public String getImage() {
            return image;
        }

        public void setImage(String image) {
            this.image = image;
        }

        public SceneDelayedTask getSceneDelayedTask() {
            return sceneDelayedTask;
        }

        public void setSceneDelayedTask(SceneDelayedTask sceneDelayedTask) {
            this.sceneDelayedTask = sceneDelayedTask;
        }

        public SceneDeviceInstructBean getSceneDeviceInstruct() {
            return sceneDeviceInstruct;
        }

        public void setSceneDeviceInstruct(SceneDeviceInstructBean sceneDeviceInstruct) {
            this.sceneDeviceInstruct = sceneDeviceInstruct;
        }

        public SceneDeviceGroupInstruct getSceneDeviceGroupInstruct() {
            return sceneDeviceGroupInstruct;
        }

        public void setSceneDeviceGroupInstruct(SceneDeviceGroupInstruct sceneDeviceGroupInstruct) {
            this.sceneDeviceGroupInstruct = sceneDeviceGroupInstruct;
        }

        public ScenePushMessage getScenePushMessage() {
            return scenePushMessage;
        }

        public void setScenePushMessage(ScenePushMessage scenePushMessage) {
            this.scenePushMessage = scenePushMessage;
        }

        public List<LinkageStartStop> getLinkageStartStops() {
            return linkageStartStops;
        }

        public void setLinkageStartStops(List<LinkageStartStop> linkageStartStops) {
            this.linkageStartStops = linkageStartStops;
        }
    }

    public static class SceneDelayedTask{
        private Integer longTime;

        public Integer getLongTime() {
            return longTime;
        }

        public void setLongTime(Integer longTime) {
            this.longTime = longTime;
        }
    }

    public static class ScenePushMessage {
        private String serialNo;
        private String message;
        private String title;
        private List<SubMessagePeople> subMessagePeople;

        public String getSerialNo() {
            return serialNo;
        }

        public void setSerialNo(String serialNo) {
            this.serialNo = serialNo;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public List<SubMessagePeople> getSubMessagePeople() {
            return subMessagePeople;
        }

        public void setSubMessagePeople(List<SubMessagePeople> subMessagePeople) {
            this.subMessagePeople = subMessagePeople;
        }
    }

    public static class SceneDeviceInstructBean{
        private String deviceItemSerialNo;
        private DeviceItemStateDataBean deviceItemStateData;
        private Integer triggerTime;
        private String deviceType;

        public String getDeviceItemSerialNo() {
            return deviceItemSerialNo;
        }

        public void setDeviceItemSerialNo(String deviceItemSerialNo) {
            this.deviceItemSerialNo = deviceItemSerialNo;
        }

        public DeviceItemStateDataBean getDeviceItemStateData() {
            return deviceItemStateData;
        }

        public void setDeviceItemStateData(DeviceItemStateDataBean deviceItemStateData) {
            this.deviceItemStateData = deviceItemStateData;
        }

        public Integer getTriggerTime() {
            return triggerTime;
        }

        public void setTriggerTime(Integer triggerTime) {
            this.triggerTime = triggerTime;
        }

        public String getDeviceType() {
            return deviceType;
        }

        public void setDeviceType(String deviceType) {
            this.deviceType = deviceType;
        }
    }

    public static class SceneDeviceGroupInstruct{
        private String deviceGroupSerialNo;
        private DeviceItemStateDataBean stateData;
        private Integer triggerTime;

        public String getDeviceGroupSerialNo() {
            return deviceGroupSerialNo;
        }

        public void setDeviceGroupSerialNo(String deviceGroupSerialNo) {
            this.deviceGroupSerialNo = deviceGroupSerialNo;
        }

        public DeviceItemStateDataBean getStateData() {
            return stateData;
        }

        public void setStateData(DeviceItemStateDataBean stateData) {
            this.stateData = stateData;
        }

        public Integer getTriggerTime() {
            return triggerTime;
        }

        public void setTriggerTime(Integer triggerTime) {
            this.triggerTime = triggerTime;
        }
    }

    public static class DeviceItemStateDataBean{
        private String attr;
        private Map<String, String> status;

        public String getAttr() {
            return attr;
        }

        public void setAttr(String attr) {
            this.attr = attr;
        }

        public Map<String, String> getStatus() {
            return status;
        }

        public void setStatus(Map<String, String> status) {
            this.status = status;
        }

        public DeviceItemStateDataBean() {}

        public DeviceItemStateDataBean(String attr, Map<String, String> status) {
            this.attr = attr;
            this.status = status;
        }
    }
}
